{% extends "base.html" %}

{% block title %}{{ post.title }} - {{ settings.site_title }}{% endblock %}

{% block content %}
<div class="container article-container">
    <div class="main-layout">
        <div class="main-content">
            <article class="post-full">
                <header class="post-full-header">
                    <h1 class="post-full-title">{{ post.title }}</h1>
                    <div class="post-full-meta">
                        <time datetime="{{ post.created_at }}">{{ post.created_at.split('T')[0] }}</time>
                    </div>
                </header>

                <section class="post-full-content">
                    {{ content|safe }}
                </section>
            </article>
        </div>
        
        {% if pages %}
        <aside class="sidebar">
            <div class="sidebar-widget">
                <h3 class="widget-title">页面</h3>
                <ul class="page-list">
                    {% for page in pages %}
                    <li class="page-item">
                        <a href="{{ url_for('page_detail', slug=page.slug) }}" class="page-link">{{ page.title }}</a>
                    </li>
                    {% endfor %}
                </ul>
            </div>
        </aside>
        {% endif %}
    </div>
</div>
{% endblock %}
